package com.xiaofeng.pochi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaofeng.pochi.common.Page;
import com.xiaofeng.pochi.pojo.SysMenu;
import com.xiaofeng.pochi.pojo.SysUser;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/07/30/22:48
 * @Description:
 */
public interface SysMenuMapper extends BaseMapper<SysMenu> {
    /**
     * 查询总数
     * @param page
     * @return
     */
    Integer countByPage(Page<SysMenu> page);

    /**
     * 分页查询
     * @param page
     * @return
     */
    List<SysMenu> getByPage(Page<SysMenu> page);

    List<SysMenu> getRoleSelectMenu(Long roleId);

    List<SysMenu> getEnableMenuByUserId(Long id);

    /**
     * 查询用户权限
     * @param
     * @return
     */
    List<String> getMenuCodeByUserId(Long userId);
}
